package com.jia.train.seat.mapper;

import com.jia.train.seat.entity.Trips;
import com.jia.train.seat.entity.TripsExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
// <cache-ref namespace="TripsMapper"/>
// @CacheNamespaceRef(TripsMapper.class)
// mybatis 二级缓存的两种方式 都是用来共享缓存的存储空间
public interface TripsMapper {
    long countByExample(TripsExample example);

    int deleteByExample(TripsExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Trips record);

    int insertSelective(Trips record);

    List<Trips> selectByExample(TripsExample example);

    Trips selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Trips record, @Param("example") TripsExample example);

    int updateByExample(@Param("record") Trips record, @Param("example") TripsExample example);

    int updateByPrimaryKeySelective(Trips record);

    int updateByPrimaryKey(Trips record);
}